Skip to contentMethod: handle(RowEndSymbol, PackageDescriptionFileParser)
      1: package parser.states.packagestates;
2: 
3: import parser.PackageDescriptionFileParser;
4: import parser.ParserConstants;
5: import symbols.CommentSymbol;
6: import symbols.EndSymbol;
7: import symbols.RowEndSymbol;
8: import symbols.PackageDescriptionSymbolVisitor;
9: import symbols.VariableSymbol;
10: 
11: /**
12:  * This class represents the Visitor for the InitialStateSymbol.
13:  * 
14:  * @author HFW410
15:  * 
16:  */
17: public class InitialsStateSymbolVisitor extends PackageDescriptionSymbolVisitor {
18:         /**
19:          * creates a InitialStateSymbolVisitor.
20:          */
21:         protected InitialsStateSymbolVisitor() {
22:                 super(ParserConstants.INITIAL_FEHLER);
23:         }
24: 
25:         @Override
26:         public AbstractPackageParserState handle(final CommentSymbol commentSymbol,
27:                         final PackageDescriptionFileParser parser) {
28:                 return new CommentState(parser);
29:         }
30: 
31:         @Override
32:         public AbstractPackageParserState handle(final EndSymbol endSymbol,
33:                         final PackageDescriptionFileParser parser) throws InterruptedException {
34:                 parser.skip();
35:                 parser.setFinished(true);
36:                 return new PackageDescriptionInitialState(parser);
37:         }
38: 
39:         @Override
40:         public AbstractPackageParserState handle(final RowEndSymbol rowEndSymbol,
41:                         final PackageDescriptionFileParser parser) throws InterruptedException {
42:                 parser.skip();
43:                 return new PackageDescriptionInitialState(parser);
44:         }
45: 
46:         @Override
47:         public AbstractPackageParserState handle(final VariableSymbol variableSymbol,
48:                         final PackageDescriptionFileParser parser) {
49:                 return new VariableState(parser);
50: 
51:         }
52: 
53: }